package com.zygh.policeasset.mapper;

import com.zygh.policeasset.pojo.DailyMaintenanceBigClassification;
import com.zygh.policeasset.pojo.DailyMaintenanceSmallClassification;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface DailyMaintenanceSmallClassificationMapper {

    @Select({"<script>" +
            "select * from daily_maintenance_small_classification  " +
            "<where>" +
            "<if test='name != null and name.length &gt; 0'>  name like concat('%',#{name},'%')</if>" +
            "<if test='bigId != null'>and big_id = #{bigId}</if>" +
            "</where>" +
            "</script>"
    })
    @Results(id = "map", value = {
            @Result(property = "bigId", column = "big_id")})
    List<DailyMaintenanceSmallClassification> findAll(@Param("name") String name,
                                                      @Param("bigId") Integer bigId);
}